package com.itheima.reggie.dto;

import com.itheima.reggie.entity.Dish;
import com.itheima.reggie.entity.DishFlavor;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;

@Data

//继承了 Dish，所有的属性都继承过来了，然后又扩展了 flavors，声明来接收页面提交的 flavors
public class DishDto extends Dish {

    //flavors里面的name和value对应的封装到DishFlavor
    private List<DishFlavor> flavors = new ArrayList<>();
    //flavors:[{name: "甜味", value: "["无糖","少糖","半糖","多糖","全糖"]", showOption: false},…]
    //0:{name: "甜味", value: "["无糖","少糖","半糖","多糖","全糖"]", showOption: false}
    //1:{name: "温度", value: "["热饮","常温","去冰","少冰","多冰"]", showOption: false}

    private String categoryName;

    private Integer copies;
}
